﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Routing;
using Thor.Domain;

namespace Thor.Models
{
    public class CalendarEntry
    {
        #region constructors

        public CalendarEntry() { }

        public CalendarEntry(DateTime time, bool available, bool offHours, bool isCurrent, Guid calendarId, string calendarName, string calendarEmail, string displayText)
        {
            Time = time;
            Available = available;
            CalendarId = calendarId;
            CalendarName = calendarName;
            CalendarEmail = calendarEmail;
            OffHours = offHours;
            IsCurrent = isCurrent;
            DisplayText = displayText;
        }

        #endregion

        #region properties

        public DateTime Time { get; set; }
        public bool Available { get; set; }
        public bool OffHours { get; set; }
        public Guid CalendarId { get; set; }
        public string CalendarName { get; set; }
        public string CalendarEmail { get; set; }
        public bool IsCurrent { get; set; }
        public string DisplayText { get; set; }

        #endregion

        #region methods

        public RouteValueDictionary GetRouteValueDictionary()
        {
            RouteValueDictionary rvd = new RouteValueDictionary();

            rvd.Add("Time", this.Time);
            rvd.Add("Available", this.Available);
            rvd.Add("OffHours", this.OffHours);
            rvd.Add("CalendarId", this.CalendarId);
            rvd.Add("CalendarName", this.CalendarName);
            rvd.Add("CalendarEmail", this.CalendarEmail);
            rvd.Add("IsCurrent", this.IsCurrent);

            return rvd;
        }

        #endregion
    }
}
